<d-toast [value]="messages"></d-toast>
<div class="control-container">
  <d-multi-auto-complete
    [(ngModel)]="multiItems2"
    [searchFn]="onSearchMultiple2.bind(this)"
    [ngModelOptions]="{ updateOn: 'blur' }"
    [dValidateRules]="[{ minlength: 3 }]"
    (autoSubmit)="autoSubmit($event)"
  >
  </d-multi-auto-complete>
  <div class="button-group">
    <d-button
      icon="icon-close"
      title="Clear"
      bsStyle="common"
      (btnClick)="clear()"
      [disabled]="!(multiItems2 && multiItems2.length)"
    ></d-button>
    <d-button
      icon="icon-copy"
      title="Copy"
      bsStyle="common"
      (btnClick)="copy()"
      [disabled]="!(multiItems2 && multiItems2.length)"
    ></d-button>
  </div>
</div>

<pre>{{ multiItems2 | json }}</pre>
